<?php //pack11class

class NewTextPopup extends Module {

    public $width="400px";
    public $traceEnabled=true;
    public $cancel="Cancel";
    public $question="Undefined";
    public $submit="Submit";
    public $buttons="";

    public function setup() {
        $this->question=LabelManager::getLabel("new_value_label");
        $this->setID("NewTextPopup");
        $this->setClass("popup");
        $spacer=new Spacer;
        $spacer->addStyle("height","4px");
        $this->addChild($spacer);

        $languages=LanguagesManager::getLanguages();
        foreach($languages as $language) {
            $field=new TextAreaInput();
            $field->label=$language->label;
            $field->id="NTP_".$language->system;
            $field->setClass("LangInput");
            $field->property_name=$language->system;
            $field->events='onkeydown="ValuesManager.countText(this)" onkeyup="ValuesManager.countText(this)" onblur="ValuesManager.countText(this)" onclick="ValuesManager.countText(this)"';
            $this->addChild($field);
        }

        $cancel=new FormButton;
        $cancel->value=LabelManager::getLabel("button_cancel");
        $cancel->type=FormButton::TYPE_BUTTON;
        $cancel->setID("NewTextCancel");
        $this->buttons.=Template::html($cancel);

        $save=new FormButton;
        $save->value=LabelManager::getLabel("button_save");
        $save->type=FormButton::TYPE_BUTTON;
        $save->setID("NewTextSubmit");
        $this->buttons.=Template::html($save);

    }

}
?>
